package cloud.topdaddy.admin.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 菜单表
 *
 * @author topdaddy
 * @since 2025-07-01 14:22:43
 */
@Data
@TableName("sys_menu")
@EqualsAndHashCode(callSuper = true)
public class SysMenu extends Model<SysMenu> {

    /**
     * 菜单ID
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "菜单ID")
    private Long menuId;

    /**
     * 菜单名称
     */
    @Schema(description = "菜单名称")
    private String menuName;

    /**
     * 类型
     *
     */
    //     * @see MenuTypeEnum
    @Schema(description = "类型")
    private Integer menuType;

    /**
     * 父菜单ID
     */
    @Schema(description = "父菜单ID")
    private Long parentId;

    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序")
    private Integer sort;

    /**
     * 路由地址
     */
    @Schema(description = "路由地址")
    private String path;

    /**
     * 组件路径
     */
    @Schema(description = "组件路径")
    private String component;

    /**
     * 是否为外链
     */
    @Schema(description = "是否为外链")
    private Boolean frameFlag;

    /**
     * 外链地址
     */
    @Schema(description = "外链地址")
    private String frameUrl;

    /**
     * 是否缓存
     */
    @Schema(description = "是否缓存")
    private Boolean cacheFlag;

    /**
     * 显示状态
     */
    @Schema(description = "显示状态")
    private Boolean visibleFlag;

    /**
     * 禁用状态
     */
    @Schema(description = "禁用状态")
    private Boolean disabledFlag;

    /**
     * 后端权限字符串
     */
    @Schema(description = "后端权限字符串")
    private String apiPerms;

    /**
     * 权限类型
     */
    @Schema(description = "权限类型")
    private Integer permsType;

    /**
     * 前端权限字符串
     */
    @Schema(description = "前端权限字符串")
    private String webPerms;

    /**
     * 菜单图标
     */
    @Schema(description = "菜单图标")
    private String icon;

    /**
     * 按钮关联菜单ID
     */
    @Schema(description = "按钮关联菜单ID")
    private Long contextMenuId;

    /**
     * 删除状态
     */
    @Schema(description = "删除状态")
    private Boolean deletedFlag;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private Long createBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 更新人
     */
    @Schema(description = "更新人")
    private Long updateBy;

}
